package com.hzw.saas.api.msg.query;

import javax.validation.constraints.NotBlank;

import com.hzw.saas.api.msg.enums.MsgType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 个人消息
 * </p>
 *
 * @author sonam
 * @since 2021/1/7 13:52
 */
@ApiModel("个人消息")
public class MsgUserQuery extends MsgQuery {

    @Setter
    @Getter
    @ApiModelProperty(value="消息标题(可以为空)")
    private String title;

    @Setter
    @Getter
    @ApiModelProperty(value = "fromUserId（可以为空，为空则是当前登录的用户ID）")
    private String from;

    @Setter
    @Getter
    @NotBlank(message = "目标对象不能为空")
    @ApiModelProperty(value = "toUserId", required = true)
    private String to;

    @Getter
    @ApiModelProperty(hidden = true)
    private int type = MsgType.USER_MSG.code();

    @Override
    public MsgType getMsgType() {
        return MsgType.USER_MSG;
    }
}
